<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group(function () {
//免登陆路由
    Route::get('wechatLogin', 'Wechat/wechatLogin');
    Route::post('smsCode', 'User/smsCode');
    Route::post('login', 'User/login');
    Route::post('getConfig', 'Publice/getConfig');
    Route::post('payAmount', 'Publice/payAmount');
    Route::post('upload', 'Publice/upload');
    Route::post('storeList', 'Publice/storeList');
    Route::post('goodsNotify', 'Wechat/goodsNotify');
    Route::post('packageNotify', 'Wechat/packageNotify');
    Route::post('rechargeNotify', 'Wechat/rechargeNotify');
    Route::post('goodsReturns', 'Wechat/goodsReturns');
    Route::post('userinfo','User/userInfo'); // 用户详情
    Route::post('sign','Wechat/sign'); // 用户详情
    Route::post('alipolymerizationNotify','Order/alipolymerizationNotify');
    Route::post('polymerizationNotify','Wechat/polymerizationNotify');
    Route::post('polymerizationPay', 'Order/polymerizationPay');//   聚合支付



    Route::post('index','Test/downloadCertificatesold'); // 用户详情
    Route::post('send','Wechat/send'); // 用户详情
    Route::post('amountRefund','user/amountRefund');

})->middleware(\app\http\middleware\AllowOrigin::class);
//登陆路由
Route::group(function () {
    Route::post('balance','User/balance'); // 用户详情
    Route::post('updateUser','User/updateUser');// 修改用户
    Route::post('getProvince','Publice/getProvince'); // 获取省数据
    Route::post('getCity','Publice/getCity'); // 获取市数据
    Route::post('getArea','Publice/getArea');// 获取 区数据
    Route::post('poster','Publice/poster');//  图片
    Route::post('template','Publice/template');//  版面
    Route::post('module','Publice/module');//  首页栏位
    Route::post('userLevel','Publice/userLevel');//  用户等级列表
    Route::post('couponList','Coupon/couponList');//  优惠券列表
    Route::post('receiveCoupon','Coupon/receiveCoupon'); //  领取优惠券
    Route::post('myCoupon','Coupon/myCoupon');//  我的优惠券

    // 套餐
    Route::group(function () {
        Route::post('packageList', 'Package/packageList');//  套餐列表
        Route::post('myPackage', 'Package/Package/myPackage');//  我的套餐列表
        Route::post('packageInfo', 'Package/packageInfo');//  未购买的套餐详情
        Route::post('myPackageInfo', 'Package/myPackageInfo');//  已购买的套餐详情
        Route::post('packageParameter', 'Package/packageParameter');//  套餐卡二维码
        Route::post('usePackage', 'Package/usePackage');//  核销套
        Route::post('buyPackage', 'Package/buyPackage');//  核销套餐卡餐卡
        Route::post('usePackageLog', 'Package/usePackageLog');//  核销套餐卡餐卡
        Route::post('packageDiscount', 'Package/discount');//  核销套餐卡餐卡

    });

    Route::group(function () {
        Route::post('addressEdit', 'Address/addressEdit');//
        Route::post('addressList', 'Address/addressList');//
        Route::post('setDefault', 'Address/setDefault');//
        Route::post('delAddress', 'Address/delAddress');//
        Route::post('getDefaultAddress', 'Address/getDefaultAddress');
    });


    Route::group(function () {
        Route::post('classifyList', 'Goods/classifyList');//  套餐列表
        Route::post('goodsList', 'Goods/goodsList');//  套餐列表
        Route::post('goodsInfo', 'Goods/goodsInfo');//  套餐列表
        Route::post('GooodsDiscount', 'Goods/GooodsDiscount');//  套餐列表
    });

    Route::group(function () {
        Route::post('createGoodsOrder', 'Order/createGoodsOrder');//  购买商品
        Route::post('createPackageOrder', 'Order/createPackageOrder');//  购买套餐
        Route::post('rechargeOrder', 'Order/rechargeOrder');//  购买套餐
        Route::post('goodsOrderList', 'Order/goodsOrderList');//  购买套餐
        Route::post('goodsOrderInfo', 'Order/goodsOrderInfo');//   商品订单列表
        Route::post('packageOrderList', 'Order/packageOrderList');//   套餐卡订单列表
        Route::post('rechargeOrderList', 'Order/rechargeOrderList');//   套餐卡订单列表
        Route::post('confirmOrder', 'Order/confirmOrder');//   套餐卡订单列表
        Route::post('completeGoodsOrder', 'Order/completeGoodsOrder');//   套餐卡订单列表
        Route::post('applyReturns', 'Order/applyReturns');//   套餐卡订单列表
        Route::post('payGoodsOrder', 'Order/payGoodsOrder');//   套餐卡订单列表
        Route::post('cancelOrder', 'Order/cancelOrder');//   套餐卡订单列表



    });
    Route::group(function () {
        Route::post('signConfig', 'Sign/signConfig');//  签到配置
        Route::post('signLog', 'Sign/signLog');//  签到记录
        Route::post('signIn', 'Sign/signIn');//  签到记录

    });
    Route::group(function () {
        Route::post('fans', 'User/fans');//  直推
        Route::post('secondFans', 'User/secondFans');//  间推
        Route::post('commissionDetail', 'User/commissionDetail');//  佣金明细
        Route::post('myTeam', 'User/myTeam');//
        Route::post('integralLog', 'User/integralLog');//
        Route::post('expenditure', 'User/expenditure');//
    });

    Route::group(function () {

        Route::post('withdrawalList', 'Withdrawal/withdrawalList');//   提现列表
        Route::post('applyWithdrawal', 'Withdrawal/applyWithdrawal');//  申请提现
        Route::post('withdrawalInfo', 'Withdrawal/withdrawalInfo');//  申请提现

    });



})->middleware(\app\http\middleware\CheckToken::class)->middleware(\app\http\middleware\AllowOrigin::class);


